<?php
namespace ClubAPP\Controller;
use Think\Controller;
class ClubController extends Controller {
    public function clublist(){
        $clubmodel = M('club');
        $club = $clubmodel->select();      
        echo json_encode($club);
    }
    public function clubdetail($club_id){
     $clubmodel = M('club');
     $club=$clubmodel->where("club_id=$club_id")->find();
     echo json_encode($club);
    }
    public function courselist(){
        $coursemodel=M('course');
        $course=$coursemodel->where("course_flag=1")->select();
        echo json_encode($course);
    } 
    public function videolist(){
        $videomodel = M('video');
        $video = $videomodel->select();      
        echo json_encode($video);
    }
    public function videodetail($video_id){
     $videomodel = M('video');
     $video=$videomodel->where("video_id=$video_id")->find();
     echo json_encode($video);
    }
}
?>